#!/usr/bin/python

import sys
import os

x = 'spam'

while x :
    print (x)
    x = x[1:]

while True:
    name = raw_input('Enter name:')
    if name == 'stop': 
        break
    age = input('Enter age:')
    print ('Hello', name, '=>', int (age) )

def judge(y):
    x = y // 2

    while x > 1:
        if y % x == 0:
            print (y, 'has factor', x)
            break
        x -= 1
    else:
        print (y, 'is prime')

judge(8)
judge(19)
judge(119)
